;model new
;;
;; INITIAL CONDITIONS
;;
;; ROUNDING of BLOCKS
;block tolerance corner-round-length 0.1
;
;;
;; DAMPING METHOD
;block mechanical damping global
;;
;;
;
;; GEOMETRY of block with TOPOGRAPHY
;;
;block create polygon 0,-18 0,50.04 2,51.09 4,51.97 6,53.14 8,53.74 10,54.38 12,56.49 14,58.65 16,61.07 18,63.81 20,66.86 &
;22,68.24 24,71.77 26,76.27 28,78.06 30,82.24 32,83.80 34,82.38 36,81.53 38,81.07 40,79.96 42,78.26 &
;44,77.57 46,75.74 48,74.42 50,73.25 52,71.51 54,70.58 56,69.70 58,68.23 60,66.75 62,65.59 64,64.00 &
;66,62.50 68,60.40 70,59.33 72,57.46 74,55.51 76,54.34 78,52.46 80,49.95 82,48.54 84,46.64 86,44.61 &
;88,42.42 90,38.82 92,32.52 94,30.92 96,29.40 98,21.52 100,17.82 120,0 120,-18
;;
;
;;
;;
;; ORIENTATION of DISCONTINUITIES
;; Spacing 5 times bigger than in reality
;
;; K1 = Bedding planes at study site: 175/24, spacing 0.27m
;block cut joint-set angle 156 spacing 1.35 0.3 jointset-id 1
;block joint-delete
;;
;
;; Main Shear Plane
;table 'mainshearzone_line_prof2' import 'mainshearzone_line_prof2.tab'
;table 'mainshearzone_line_prof2' list
;
;block cut table 'mainshearzone_line_prof2' jointset-id 2
;
;
;; K4 = Joint set at study site: 125/66, spacing 0.63m
;block cut joint-set angle 116 spacing 3.15 0.8 jointset-id 4
;block joint-delete
;
;
;; K3 = Joint set at study site: 293/69, spacing 0.54m
;block cut joint-set angle 69 spacing 2.7 0.6 jointset-id 3
;block joint-delete
;;
;;
;
;; FINITE ELEMENT MESH - ZONES
;block zone generate edge 1.5
;;
;
;
;; Material PROPERTIES for DISCONTINUITIES (not ice-filled)
;; Joint persistence of 30% because many rock bridges are still existent
;; FROZEN
;
;
;; Grouping and Materials for joints potentially not assigned
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 42.1 cohesion 2.7
;;
;
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 42.1 cohesion 2.7 range jointset-id 1
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 42.1 cohesion 2.7 range jointset-id 2
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 42.1 cohesion 2.7 range jointset-id 3
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 42.1 cohesion 2.7 range jointset-id 4
;
;
;; Material properties of NEW CONTACTS
;block contact cmodel default area stiffness-shear 10000 stiffness-normal 26000 friction 42.1 cohesion 2.7
;
;
;
;; FROZEN BLOCK PROPERTIES (WETTERSTEIN LIMESTONE)
;block zone cmodel assign mohr-coulomb
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44
;;
;
;
;; BOUNDARY CONDITIONS
;;
;; Initial stress state
;model gravity 0 -9.81
;
;block insitu stress-topography kox 0.5 koz 0.5
;
;
;
;; Fixing velocities at boundaries
;; Left edge
;block gridpoint apply velocity-x 0 range position-x 0 tol 0.1
;
;; Right edge
;block gridpoint apply velocity-x 0 range position-x 120 tol 0.1
;
;; Base
;block gridpoint apply velocity-x 0 range position-y -18 tol 0.1
;block gridpoint apply velocity-y 0 range position-y -18 tol 0.1
;;
;;
;;
;; HISTORIES / OBSERVATION POINTS
;;
;block mechanical history unbalanced-maximum
;model history unbalanced-force
;model history solve-ratio
;
;;
;;block gridpoint history velocity-x 26 42.7
;;block gridpoint history velocity-x 38 52.4
;;block gridpoint history velocity-x 48 46.9
;;block gridpoint history velocity-x 74 26.8
;;block gridpoint history velocity-x 82 16.5
;;
;;block gridpoint history velocity-y 26 42.7
;;block gridpoint history velocity-y 38 52.4
;;block gridpoint history velocity-y 48 46.9
;;block gridpoint history velocity-y 74 26.8
;;block gridpoint history velocity-y 82 16.5
;;
;;block gridpoint history displacement-x 26 42.7
;;block gridpoint history displacement-x 38 52.4
;;block gridpoint history displacement-x 48 46.9
;;block gridpoint history displacement-x 74 26.8
;;block gridpoint history displacement-x 82 16.5
;;
;;block gridpoint history displacement-y 26 42.7
;;block gridpoint history displacement-y 38 52.4
;;block gridpoint history displacement-y 48 46.9
;;block gridpoint history displacement-y 74 26.8
;;block gridpoint history displacement-y 82 16.5
;
;
;; CALCULATIONS
;
;block solve elastic
;model save 'mc_allfrozen_solveElastic_persis30_newTop.sav'
;
;;
model restore 'mc_allfrozen_solveElastic_persis30_newTop.sav'
block factor-of-safety bracket 2 15 filename 'mc_allfrozen_persis30_newTop_fos.sav'
model save 'mc_allfrozen_persis30_newTop_fos.sav'
;
;
;
;; ------------------------------------------
;
;
;; FIRST STEP OF INCREASE IN JOINT PERSISTENCE
;
;model restore 'mc_allfrozen_solveElastic_persis30_newTop.sav'
;
;block contact reset displacement
;
;; Material PROPERTIES for DISCONTINUITIES (not ice-filled)
;; Joint persistence of 50% because many rock bridges are still existent
;; FROZEN
;
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 40.8 cohesion 2
;;
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 40.8 cohesion 2 range jointset-id 1
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 40.8 cohesion 2 range jointset-id 2
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 40.8 cohesion 2 range jointset-id 3
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 40.8 cohesion 2 range jointset-id 4
;
;
;; Material properties of NEW CONTACTS
;block contact cmodel default area stiffness-shear 10000 stiffness-normal 26000 friction 40.8 cohesion 2
;
;
;; CALCULATIONS
;block cycle 5000
;model save 'mc_allfrozen_persis50_newTop.sav'
;
;;
;;block factor-of-safety bracket 1 10 file 'mc_allfrozen_persis50_paralt2_fos.sav'
;;model save 'mc_allfrozen_persis50_paralt2_fos.sav'
;
;
;
;; ------------------------------------------
;
;
;; SECOND STEP OF INCREASE IN JOINT PERSISTENCE
;
;model restore 'mc_allfrozen_persis50_newTop.sav'
;
;block contact reset displacement
;
;
;; Material PROPERTIES for DISCONTINUITIES (not ice-filled)
;; Joint persistence of 70% because many rock bridges are still existent
;; FROZEN
;
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 39.5 cohesion 1.2
;;
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 39.5 cohesion 1.2 range jointset-id 1
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 39.5 cohesion 1.2 range jointset-id 2
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 39.5 cohesion 1.2 range jointset-id 3
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 39.5 cohesion 1.2 range jointset-id 4
;
;
;; Material properties of NEW CONTACTS
;block contact cmodel default area stiffness-shear 10000 stiffness-normal 26000 friction 39.5 cohesion 1.2
;
;
;
;
;; CALCULATIONS
;block cycle 5000
;model save 'mc_allfrozen_persis70_newTop.sav'
;

model restore 'mc_allfrozen_persis70_newTop.sav'
block factor-of-safety bracket 1 10 file 'mc_allfrozen_persis70_newTop_fos.sav'
model save 'mc_allfrozen_persis70_newTop_fos.sav'



; ------------------------------------------


;; THIRD STEP OF INCREASE IN JOINT PERSISTENCE
;
;
;model restore 'mc_allfrozen_persis70_newTop.sav'
;
;
;; GROUPING of BLOCKS
;block group 'Rock mass=ThawLevel0'
;
;; Grouping and Materials for joints potentially not assigned
;block contact group 'Joints=all' range group 'Rock mass=ThawLevel0'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=all'
;
;
;; Layers for progressive warming or thawing
;table 'ThawLevel0_Line_NewTop' import 'ThawLevel0_Line_NewTop.tab'
;table 'ThawLevel1_Line_NewTop' import 'ThawLevel1_Line_NewTop.tab'
;table 'ThawLevel2_Line_NewTop' import 'ThawLevel2_Line_NewTop.tab'
;table 'ThawLevel3_Line_NewTop' import 'ThawLevel3_Line_NewTop.tab'
;table 'ThawLevel4_Line_NewTop' import 'ThawLevel4_Line_NewTop.tab'
;
;table 'ThawLevel0_Line_NewTop' list
;table 'ThawLevel1_Line_NewTop' list
;table 'ThawLevel2_Line_NewTop' list
;table 'ThawLevel3_Line_NewTop' list
;table 'ThawLevel4_Line_NewTop' list
;
;
;block group 'Rock mass=frozen' range below table 'ThawLevel0_Line_NewTop'
;
;block group 'Rock mass=ThawLevel1' range right 63,-18 63,60 group 'Rock mass=ThawLevel0' not
;block group 'Rock mass=ThawLevel1' range above table 'ThawLevel1_Line_NewTop' group 'Rock mass=ThawLevel0' not
;
;block group 'Rock mass=ThawLevel2' range right 56,-18 56,60 group 'Rock mass=ThawLevel0' not group 'Rock mass=ThawLevel1' not
;block group 'Rock mass=ThawLevel2' range above table 'ThawLevel2_Line_NewTop' group 'Rock mass=ThawLevel0' not group 'Rock mass=ThawLevel1' not
;
;block group 'Rock mass=ThawLevel3' range right 48,-18 48,60 group 'Rock mass=ThawLevel0' not group 'Rock mass=ThawLevel1' not group 'Rock mass=ThawLevel2' not
;block group 'Rock mass=ThawLevel3' range above table 'ThawLevel3_Line_NewTop' group 'Rock mass=ThawLevel0' not group 'Rock mass=ThawLevel1' not group 'Rock mass=ThawLevel2' not
;
;block group 'Rock mass=ThawLevel4' range right 41,-18 41,60 group 'Rock mass=ThawLevel0' not group 'Rock mass=ThawLevel1' not group 'Rock mass=ThawLevel2' not group 'Rock mass=ThawLevel3' not
;block group 'Rock mass=ThawLevel4' range above table 'ThawLevel4_Line_NewTop' group 'Rock mass=ThawLevel0' not group 'Rock mass=ThawLevel1' not group 'Rock mass=ThawLevel2' not group 'Rock mass=ThawLevel3' not
;
;
;
;; GROUPING / Material PROPERTIES for DISCONTINUITIES (NOT ice-filled)
;; assuming a joint persistence of 90% because rock bridges have already been destroyed
;; Shear zone has a persistence of 100%
;; start with minus 4 degrees for all
;
;; THAW LEVEL 0:
;block contact group 'Joints=shear zone_ThawLevel0' range jointset-id 2 group 'Rock mass=ThawLevel0'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 37.6 cohesion 0 range group 'Joints=shear zone_ThawLevel0'
;;
;block contact group 'Joints=K1_ThawLevel0' range jointset-id 1 group 'Rock mass=ThawLevel0'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=K1_ThawLevel0'
;;
;block contact group 'Joints=K3_ThawLevel0' range jointset-id 3 group 'Rock mass=ThawLevel0'
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 38.2 cohesion 0.4 range group 'Joints=K3_ThawLevel0'
;;
;block contact group 'Joints=K4_ThawLevel0' range jointset-id 4 group 'Rock mass=ThawLevel0'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 38.2 cohesion 0.4 range group 'Joints=K4_ThawLevel0'
;
;
;
;; THAW LEVEL 1:
;block contact group 'Joints=shear zone_ThawLevel1' range jointset-id 2 group 'Rock mass=ThawLevel1'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 37.6 cohesion 0 range group 'Joints=shear zone_ThawLevel1'
;;
;block contact group 'Joints=K1_ThawLevel1' range jointset-id 1 group 'Rock mass=ThawLevel1'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=K1_ThawLevel1'
;;
;block contact group 'Joints=K3_ThawLevel1' range jointset-id 3 group 'Rock mass=ThawLevel1'
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 38.2 cohesion 0.4 range group 'Joints=K3_ThawLevel1'
;;
;block contact group 'Joints=K4_ThawLevel1' range jointset-id 4 group 'Rock mass=ThawLevel1'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 38.2 cohesion 0.4 range group 'Joints=K4_ThawLevel1'
;
;
;
;; THAW LEVEL 2:
;block contact group 'Joints=shear zone_ThawLevel2' range jointset-id 2 group 'Rock mass=ThawLevel2'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 37.6 cohesion 0 range group 'Joints=shear zone_ThawLevel2'
;;
;block contact group 'Joints=K1_ThawLevel2' range jointset-id 1 group 'Rock mass=ThawLevel2'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=K1_ThawLevel2'
;;
;block contact group 'Joints=K3_ThawLevel2' range jointset-id 3 group 'Rock mass=ThawLevel2'
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 38.2 cohesion 0.4 range group 'Joints=K3_ThawLevel2'
;;
;block contact group 'Joints=K4_ThawLevel2' range jointset-id 4 group 'Rock mass=ThawLevel2'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 38.2 cohesion 0.4 range group 'Joints=K4_ThawLevel2'
;
;
;
;; THAW LEVEL 3:
;block contact group 'Joints=K1_ThawLevel3' range jointset-id 1 group 'Rock mass=ThawLevel3'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=K1_ThawLevel3'
;;
;block contact group 'Joints=K3_ThawLevel3' range jointset-id 3 group 'Rock mass=ThawLevel3'
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 38.2 cohesion 0.4 range group 'Joints=K3_ThawLevel3'
;;
;block contact group 'Joints=K4_ThawLevel3' range jointset-id 4 group 'Rock mass=ThawLevel3'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 38.2 cohesion 0.4 range group 'Joints=K4_ThawLevel3'
;
;
;
;; THAW LEVEL 4:
;block contact group 'Joints=K1_ThawLevel4' range jointset-id 1 group 'Rock mass=ThawLevel4'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=K1_ThawLevel4'
;;
;block contact group 'Joints=K3_ThawLevel4' range jointset-id 3 group 'Rock mass=ThawLevel4'
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 38.2 cohesion 0.4 range group 'Joints=K3_ThawLevel4'
;;
;block contact group 'Joints=K4_ThawLevel4' range jointset-id 4 group 'Rock mass=ThawLevel4'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 38.2 cohesion 0.4 range group 'Joints=K4_ThawLevel4'
;;
;
;; FROZEN CORE:
;block contact group 'Joints=K1_frozen' range jointset-id 1 group 'Rock mass=frozen'
;block contact cmodel assign area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4 range group 'Joints=K1_frozen'
;;
;block contact group 'Joints=K3_frozen' range jointset-id 3 group 'Rock mass=frozen'
;block contact cmodel assign area stiffness-shear 4300 stiffness-normal 11100 friction 38.2 cohesion 0.4 range group 'Joints=K3_frozen'
;;
;block contact group 'Joints=K4_frozen' range jointset-id 4 group 'Rock mass=frozen'
;block contact cmodel assign area stiffness-shear 5000 stiffness-normal 13000 friction 38.2 cohesion 0.4 range group 'Joints=K4_frozen'
;
;
;; Material properties of NEW CONTACTS
;block contact cmodel default area stiffness-shear 10000 stiffness-normal 26000 friction 38.2 cohesion 0.4
;
;
;
;; GROUPING / BLOCK PROPERTIES 
;
;; THAW LEVEL 0
;block zone group 'zRock mass=ThawLevel0' range group 'Rock mass=ThawLevel0'
;block zone cmodel assign mohr-coulomb range group 'zRock mass=ThawLevel0'
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44 range group 'zRock mass=ThawLevel0'
;
;; THAW LEVEL 1
;block zone group 'zRock mass=ThawLevel1' range group 'Rock mass=ThawLevel1'
;block zone cmodel assign mohr-coulomb range group 'zRock mass=ThawLevel1'
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44 range group 'zRock mass=ThawLevel1'
;;
;; THAW LEVEL 2
;block zone group 'zRock mass=ThawLevel2' range group 'Rock mass=ThawLevel2'
;block zone cmodel assign mohr-coulomb range group 'zRock mass=ThawLevel2'
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44 range group 'zRock mass=ThawLevel2'
;
;; THAW LEVEL 3
;block zone group 'zRock mass=ThawLevel3' range group 'Rock mass=ThawLevel3'
;block zone cmodel assign mohr-coulomb range group 'zRock mass=ThawLevel3'
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44 range group 'zRock mass=ThawLevel3'
;
;; THAW LEVEL 4
;block zone group 'zRock mass=ThawLevel4' range group 'Rock mass=ThawLevel4'
;block zone cmodel assign mohr-coulomb range group 'zRock mass=ThawLevel4'
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44 range group 'zRock mass=ThawLevel4'
;
;; FROZEN CORE
;block zone group 'zRock mass=frozen' range group 'Rock mass=frozen'
;block zone cmodel assign mohr-coulomb range group 'zRock mass=frozen'
;block zone property density 0.0027 bulk 20600 shear 9520 cohesion 3.9 tension 0.9 friction 44 range group 'zRock mass=frozen'
;
;
;
;; CALCULATIONS
;block cycle 5000
;model save 'mc_allfrozen_persis90_noice_newTop.sav'


model restore 'mc_allfrozen_persis90_noice_newTop.sav'
block factor-of-safety bracket 1 8 filename 'mc_allfrozen_persis90_noice_newTop_fos.sav'
model save 'mc_allfrozen_persis90_noice_newTop_fos.sav'

return